home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 045a / gobblr.zip / GOBBLER.ASC < prev    next >
Text File  |  1991-10-25  |  29KB  |  835 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                            The Gobbler
  9.    
  10.  
  11.                 A packet capturer for the BEHOLDER
  12.  
  13.                             v 2.0
  14.  
  15.  
  16.  
  17.  
  18.                          User's Guide
  19.  
  20.  
  21.                      
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. -------------------------------------------------------------------------------
  37.                            TABLE  OF CONTENTS
  38.  
  39.  
  40.  
  41.  
  42. 1. INTRODUCTION
  43.     1.1 What is the Gobbler?
  44.     1.2 Outline of this manual
  45.  
  46. 2. USING THE ONLINE GOBBLER PROGRAM
  47.     2.1 Starting and ending the online Gobbler
  48.     2.2 The Packet Capturer
  49.         2.2.1 The Show-action 
  50.         2.2.2 The Start-action
  51.             2.2.2.1 Setting the maximum packet dumpfile size
  52.             2.2.2.2 Setting the maximum number of packets
  53.             2.2.2.3 Setting the maximum runtime
  54.             2.2.2.4 Setting the packet dumpfile name
  55.             2.2.2.5 Setting the filters
  56.         2.2.3 The Stop-action
  57.         2.2.4 The Hide-action
  58.         2.2.5 The Reset-action
  59.         2.2.6 The Update-action
  60.     2.3 The filters
  61.         2.3.1 The filter criteria
  62.         2.3.2 Manipulating the filters
  63.             2.3.2.1 Read filter file
  64.             2.3.2.2 Write filter file
  65.             2.3.2.3 Positive/negative packet/start/stop filter
  66.                 2.3.2.3.1 Adding a filter
  67.                 2.3.2.3.2 Editing a filter
  68.                 2.3.2.3.3 Deleting a filter
  69.     2.4 The Dumpfile Viewer
  70.         2.4.1 The Start-action
  71.             2.4.1.1 Viewing the packet dumpfile
  72.             2.4.1.2 Selecting the packet dumpfile
  73.         2.4.2 The Stop-action
  74.     2.5 The format of the packet dumpfile
  75.     2.6 The format of the filter file
  76.  
  77. 3. THE DP.INI FILE
  78.     3.1 Introduction
  79.     3.2 The HDRTYPE definitions
  80.     3.3 The HDRADDR definitions
  81.  
  82. 4. THE RDUNIX-UTILITY
  83.     4.1 Introduction
  84.     4.2 The rdunix output format
  85.  
  86. 5. HISTORY
  87.  
  88.  
  89. -------------------------------------------------------------------------------
  90.                                 1. INTRODUCTION
  91.  
  92.  
  93.  
  94.  
  95. 1.1 What is the Gobbler?
  96.  
  97.  
  98. The Gobbler is a standalone BEHOLDER application for capturing Ethernet 
  99. packets and writing them to a packet dumpfile with filtering possibilities.
  100.  
  101.  
  102.  
  103. 1.2 Outline of this manual
  104.  
  105.  
  106. This manual has the following outline:
  107.  
  108. Chapter one is this introduction. Chapter two describes the use of the online
  109. Gobbler program: the Packet Capturer, the filters, the Dumpfile Viewer, the 
  110. dumpfile format and the filter file format. Chapter three descibes the layout
  111. of the DP.INI file as far as the Gobbler is involved. Chapter four describes a 
  112. simple utility for viewing the packet dumpfile under UNIX. Chapter five gives 
  113. the history of the Gobbler.
  114.  
  115.  
  116. -------------------------------------------------------------------------------
  117.                                 2. USING THE ONLINE GOBBLER PROGRAM
  118.  
  119.  
  120.  
  121.  
  122. 2.1 Starting and ending the online Gobbler
  123.  
  124.  
  125. The online Gobbler program can be started by typing "gobbler" at the MS-DOS 
  126. prompt.
  127.  
  128. C:\>gobbler
  129.  
  130. To get the Apps menu you have to push <ESC>. This menu contains three entries:
  131.  
  132. PktCapt
  133. FileView
  134. Quit
  135.  
  136. To start the Packet Capturer you select "PktCapt", for the Dumpfile Viewer you 
  137. choose "FileView" and to end the Gobbler program you select "Quit". Please 
  138. note that the Gobbler requires the lines:
  139.  
  140. [PKTCAPT]
  141.  
  142. StartMask = 0
  143.  
  144. to be present in your BEHOLDER.INI file.
  145.  
  146.  
  147.  
  148.  
  149. 2.2 The Packet Capturer
  150.  
  151.  
  152. To start the Packet Capturer you choose "PktCapt" in the Apps menu. After this
  153. you get the Action menu containing six entries:
  154.  
  155. Show
  156. Start
  157. Stop
  158. Hide
  159. Reset
  160. Update
  161.  
  162. The result of choosing these entries will be discussed in the next paragraphs.
  163. Pressing <ESC> returns you to the Apps menu. The Packet Capturer has a status 
  164. window (named Capture Status) in the upper right corner of your screen. It
  165. shows the packet dumpfile name, the current and maximum packet dumpfile size,
  166. the current and maximum runtime, the current and maximum number of captured
  167. packets, the number of the different types of filters and the total number of
  168. received and missed packets (from the Ethernet card) during this capturing.
  169.  
  170.  
  171.  
  172. 2.2.1 The Show-action 
  173.  
  174.  
  175. Selecting "Show" in the Action menu pops a window in the upper left half of
  176. your screen where the source address, the destination address and the protocol
  177. type of the captured packets are displayed. The addresses are displayed in the
  178. form "xx:xx:xx:xx:xx:xx", the protocol is displayed formatted "xxxx", where x
  179. is a hexadecimal digit. However, this window is updated in freetime, so if the
  180. Packet Capturer is very busy you may not see all the captured packets. See 
  181. also "Hide-action" and "Update-action".
  182.  
  183.  
  184.  
  185. 2.2.2 The Start-action
  186.  
  187.  
  188. Selecting "Start" in the Action menu pops the Capture menu, which allows you
  189. to set several Packet Capture parameters and also to set the filters. The
  190. Capture menu has five entries:
  191.  
  192. Max. dumpfile size
  193. Max. number of packets
  194. Max. runtime
  195. Dumpfile name
  196. Filters
  197.  
  198. Each of these entries is described in turn in the next paragraphs. If you 
  199. push <ESC> the Capture menu disappears and the capturing starts. See also
  200. "Stop-action" and "Reset-action".
  201.  
  202.  
  203.  
  204. 2.2.2.1 Setting the maximum packet dumpfile size
  205.  
  206.  
  207. Selecting "Max. dumpfile size" in the Capture menu allows you to set the
  208. maximum size (in bytes) of the packet dumpfile. The default is 10Kb. The
  209. capturing stops automatically if adding the next packet would make the packet 
  210. dumpfile larger than this limit.
  211.  
  212.  
  213.  
  214. 2.2.2.2 Setting the maximum number of packets
  215.  
  216.  
  217. Selecting "Max. number of packets" in the Capture menu allows you to set the
  218. maximum number of packets this capturing may catch. The default is 100 packets.
  219. The capturing stops automatically if the number of captured packets exceeds 
  220. this limit.
  221.  
  222.  
  223.  
  224. 2.2.2.3 Setting the maximum runtime
  225.  
  226.  
  227. Selecting "Max. runtime" in the Capture menu allows you to set the maximum
  228. runtime (in seconds) for this capturing. The default is 100 seconds. The 
  229. capturing stops automatically if the runtime exceeds this limit.
  230.  
  231.  
  232.  
  233. 2.2.2.4 Setting the packet dumpfile name
  234.  
  235.  
  236. Selecting "Dumfile name" in the Capture menu allows you to set the name of the
  237. packet dumpfile. The default is "PKTCAPT.DMP".
  238.  
  239.  
  240.  
  241. 2.2.2.5 Setting the filters
  242.  
  243.  
  244. See "Manipulating the filters".
  245.  
  246.  
  247.  
  248. 2.2.3 The Stop-action
  249.  
  250.  
  251. Selecting "Stop" in the Action menu stops the capturing and closes the packet 
  252. dumpfile. The capturing stops automatically if one of the limits (maximum 
  253. dumpfile size, maximum number of captured packets or maximum runtime) is 
  254. exceeded, but the Stop-action allows you to stop the capturing by hand. It is 
  255. not necessary to perform the Stop-action when the capturing has stopped by 
  256. itself. Please note that the Stop-action does not change the values for the 
  257. maximum dumpfile size, the maximum number of packets, the maximum runtime and 
  258. the dumpfile name! See also "Start-action" and "Reset-action".
  259.  
  260.  
  261.  
  262. 2.2.4 The Hide-action
  263.  
  264.  
  265. Selecting "Hide" in the Action menu hides the window in the upper left half of
  266. your screen where the source address, the destination address and the protocol
  267. type of the captured packets are displayed. See also "Show-action" and "Update-
  268. action".
  269.  
  270.  
  271.  
  272. 2.2.5 The Reset-action
  273.  
  274.  
  275. Selecting "Reset" in the Action menu resets the maximum dumpfile size, the
  276. maximum number of packets, the maximum runtime and the dumpfile name to their
  277. default values (resp. 10Kb, 100, 100 and PKTCAPT.DMP) and resets the Capture
  278. Status window. Please note that the Reset-action does not dispose the filters 
  279. (yet)!!! See also "Start-action" and "Stop-action".
  280.  
  281.  
  282.  
  283. 2.2.6 The Update-action
  284.  
  285.  
  286. Selecting "Update" in the Action menu gives the Packet Capturer forced 
  287. freetime, so it may update the window where the source address, the 
  288. destination address and the protocol type of the captured packets are 
  289. displayed (if it isn't hidden). See also "Show-action" and "Hide-action".
  290.  
  291.  
  292.  
  293. 2.3 The filters
  294.  
  295.  
  296. There are six type of filters to be used with the Packet Capturer:
  297.  
  298. Positive packet filters,
  299. Negative packet filters,
  300. Positive start filters,
  301. Negative start filters,
  302. Positive stop filters,
  303. Negative stop filters.
  304.  
  305. Positive filters contain criteria a packet has to conform to to pass the 
  306. filter, negative filters contain criteria a packet has to conform to to be 
  307. rejected by the filter. A packet is accepted if het passes ONE of the positive
  308. filters and ALL the negative filters (i.e. is not rejected by one of the 
  309. negative filters). So if a positive filter fi consists of criteria fi1...fik 
  310. and a negative filter gi contists of criteria gi1...gik and the packets are 
  311. tested on equalness to the criteria then:
  312.  
  313. A(packet) = (f1 || f2 || ... || fn) && (!g1 && !g2 && ... && !gm)
  314.           = P(f1, f2, ..., fn) && !N(g1, g2, ..., gm)
  315.  
  316. where P(f1, f2, ..., fn) = f1 || f2 || ... || fn
  317. and   N(g1, g2, ..., gm) = g1 || g2 || ... || gm
  318.  
  319. where fi = (fi1 && fi2 && ... && fik)
  320. and   gi = (gi1 && gi2 && ... && gik)
  321.  
  322. The packet filters control which packets are let through to the Packet 
  323. Capturer, while the start and stop filters trigger the starting and stopping
  324. of letting the packets through respectively. Please note that the start and
  325. stop filters do not start or stop the capturing itself. As long as no packet 
  326. has passed the start filters, no packet is let through to the Packet Capturer.
  327. After a packet has passed the start filters, packets that pass the packet 
  328. filters are let through to the Packet Capturer until a packet passes the stop 
  329. filters. After this no packets are let through to the Packet Capturer anymore
  330. until another packet passes the start filters. 
  331.  
  332.  
  333.  
  334. 2.3.1 The filter criteria
  335.  
  336.  
  337. There are six criteria a packet can be checked for:
  338.  
  339. 1. Destination address
  340. 2. Source address
  341. 3. Protocol type
  342. 4. Contents, consisting of 
  343.    a. the contents itself and 
  344.    b. an offset for the contents from the beginning of the packet
  345. 5. Device number
  346. 6. Packet size (interval), given by
  347.    a. a lower limit for the packet length and
  348.    b. an upper limit for the packet length
  349.  
  350. The filters have a status window (named Filter Status) in the lower half of 
  351. your screen. Of the first nine filters the type (Ty*), the number of the 
  352. filter in the type list (#) and the setting for the destination address 
  353. (DestAddress), the source address (SrcAddress), the protocol type (Protoco), 
  354. the contents offset (Offs), the first ten bytes of the contents (Contents), 
  355. the device number (D), the lower (Len>) and upper (Len<) limit for the packet 
  356. size are displayed. Fields for criteria which are not set are left blank.
  357.  
  358. * +P stands for positive packet filter
  359.   -P stands for negative packet filter
  360.   +B stands for positive start ("begin") filter
  361.   -B stands for negative start ("begin") filter
  362.   +E stands for positive stop ("end") filter
  363.   -E stands for negative stop ("end") filter
  364.  
  365.  
  366.  
  367. 2.3.2 Manipulating the filters
  368.  
  369.  
  370. Selecting "Filters" in the Capture menu pops the Filters menu, which allows
  371. you to perform various actions on the filters. The Filters menu has eight
  372. entries:
  373.  
  374. Read filter file
  375. Write filter file
  376. Positive packet filters
  377. Negative packet filters
  378. Positive start filters
  379. Negative start filters
  380. Positive stop filters
  381. Negative stop filters
  382.  
  383.  
  384.  
  385. 2.3.2.1 Read filter file
  386.  
  387.  
  388. To read a filter configuration from file choose "Read filter file" in the 
  389. Filters menu. You are first presented with a Filter file window allowing you 
  390. to select the filter file. The default filemask is "<current directory>\*.FIL",
  391. but you can either give another filemask or give the filename directly. If you
  392. supply a filemask, a Select File menu is opened and you can select a file by 
  393. using the Up and Down arrow keys (or the PgUp and PgDn keys) and giving 
  394. <ENTER>. If the opening of the file succeeds the filter configuration is read
  395. in. See "The format of the filter file".
  396.  
  397.  
  398.  
  399. 2.3.2.2 Write filter file
  400.  
  401.  
  402. To write the current filter configuration to file choose "Write filter file" 
  403. in the Filters menu. You are first presented with a Filter file window 
  404. allowing you to give the name of the filter file. If the opening of the file
  405. succeeds the current filter configuration is written to this file. See "The 
  406. format of the filter file".
  407.  
  408.  
  409.  
  410. 2.3.2.3 Positive/negative packet/start/stop filter
  411.  
  412.  
  413. Each of these entries in the Filters menu pops a menu containing three 
  414. entries:
  415.  
  416. Add filter
  417. Edit filter
  418. Delete filter
  419.  
  420. Each of these actions is described in the next paragraphs.
  421.  
  422.  
  423.  
  424. 2.3.2.3.1 Adding a filter
  425.  
  426.  
  427. If you select "Add filter" a filter of the previously selected type is added
  428. to the type list and you automatically get the Edit filter window for editing 
  429. this newly added filter. Since there is no limit on the number of filters per
  430. type (other than memory space), it is possible to create filters with filter 
  431. numbers higher than 9. You can edit these filters directly after they have
  432. been created, but please note that you can't edit them anymore through "Edit
  433. filter" and you can't delete them through "Delete filter" unless you have
  434. deleted filters with a lower filter number first. See "Editing a filter" and
  435. "Deleting a filter". 
  436.  
  437.  
  438.  
  439. 2.3.2.3.2 Editing a filter
  440.  
  441.  
  442. If you select "Edit filter" you are asked for a filter number in the range 1
  443. to 9. Because the program reacts on the first key you press, the largest
  444. filter number per type is limited to 9. After entering the filter number
  445. you are presented with the Edit filter window which allows you to set or alter
  446. the filter's destination address, source address, protocol type, contents and
  447. contents offset, device number, and packet size lower and upper limit.
  448. Criteria which are not set are left blank. If you set or alter the source or 
  449. destination address you are provided with a Host names menu containing the 
  450. hostnames from the DP.INI file (see "The DP.INI file"). If you select one of
  451. these hostnames the source or destination address is set to the corresponding 
  452. Ethernet address. On top of the menu is an entry called "Self define". If you 
  453. select this one, you can enter the Ethernet address yourself, formatted 
  454. "xx:xx:xx:xx:xx:xx", where x is an hexadecimal digit. If for some reason the 
  455. Host names menu cannot be created (memory shortage), you can always enter the
  456. source or destination adress in this way. If you set or alter the protocol 
  457. type you are provided with a Protocols menu containing the protocol names from
  458. the DP.INI file (see "The DP.INI file"). If you select one of these protocol 
  459. names the protocol type is set to the corresponding protocol number. On top of 
  460. the menu is an entry called "Self define". If you select this one, you can 
  461. enter the protocol number yourself, formatted "xxxx", where x is an 
  462. hexadecimal digit. If for some reason the Protocols menu cannot be created 
  463. (memory shortage), you can always enter the protocol in this way.
  464.  
  465.  
  466.  
  467. 2.3.2.3.3 Deleting a filter
  468.  
  469.  
  470. If you select "Delete filter" you are asked for a filter number in the range 1
  471. to 9. Because the program reacts on the first key you press, the largest
  472. filter number per type is limited to 9. If you delete a filter, the filter
  473. number of the next filters in the type list is decreased by one.
  474.  
  475.  
  476.  
  477. 2.4 The Dumpfile Viewer
  478.  
  479.  
  480. To start the Dumpfile Viewer you choose "FileView" in the Apps menu. After 
  481. this you get the Action menu containing six entries:
  482.  
  483. Show
  484. Start
  485. Stop
  486. Hide
  487. Reset
  488. Update
  489.  
  490. Only the Start- and Stop-action are implemented within the Dumpfile Viewer,
  491. other actions have no effect. The result of choosing these two entries will
  492. be discussed in the next paragraphs. Pressing <ESC> returns you to the Apps
  493. menu.
  494.  
  495.  
  496.  
  497. 2.4.1 The Start-action
  498.  
  499.  
  500. Selecting "Start" in the Action menu pops the Fileview menu, which contains
  501. two entries:
  502.  
  503. View
  504. Dumpfile
  505.  
  506. These entries is described in turn in the next paragraphs. From here on the 
  507. Dumpfile Viewer works exactly like the former standalone program NETVIEW,
  508. only the packet number is now also displayed at the beginning of each line of 
  509. the Frame window. See also "Stop-action".
  510.  
  511.  
  512.  
  513. 2.4.1.1 Viewing the packet dumpfile
  514.  
  515.  
  516. Selecting "View" in the Fileview menu starts the viewing of the packet 
  517. dumpfile. If you haven't explicitly selected a packet dumpfile (see "Selecting
  518. the packet dumpfile"), the default Packet Capture dumpfile PKTCAPT.DMP is 
  519. taken. "View" opens a screen sized Frame window with a list of the packets in 
  520. the dumpfile, one per line. At the bottom of the Frame window the packet 
  521. dumpfile name and its creation date and time are shown. Pressing <ESC> returns 
  522. you to the Fileview menu. Of each packet the packet number, the timestamp 
  523. since the start of the capturing (uS), the source address (Source), the 
  524. destination address (Dest), the protocol type (Type), the packet length in 
  525. bytes (Len) and some info (Info) are displayed. You can browse through the 
  526. list using the Up and Down arrow keys and the PgUp and PgDn keys. If you 
  527. select one of the packets by pressing <ENTER>, the packet's data (in 
  528. hexadecimal and ASCII dump) and, if it's a TCP/IP packet, also its IP datagram
  529. header are shown. You can browse through the data using the Up and Down arrow 
  530. keys and the PgUp and PgDn keys. Pressing <ESC> returns you to the Frame 
  531. window.
  532.  
  533.  
  534.  
  535. 2.4.1.2 Selecting the packet dumpfile
  536.  
  537.  
  538. Choosing "Dumpfile" in the Fileview menu allows you to select the packet
  539. dumpfile. The default filemask is "<current directory>\*.DMP", but you can 
  540. either give another filemask or give the filename directly. If you supply a 
  541. filemask, a Select File menu is opened and you can select a file by using the 
  542. Up and Down arrow keys (or the PgUp and PgDn keys) and giving <ENTER>.
  543.  
  544.  
  545.  
  546. 2.4.2 The Stop-action
  547.  
  548.  
  549. Selecting "Stop" in the Action menu stops the Dumpfile Viewer. You have to 
  550. perform the Stop-action before you can perform the Start-action again. See
  551. also "Start-action".
  552.  
  553.  
  554.  
  555. 2.5 The format of the packet dumpfile
  556.  
  557.  
  558. The format of the packet dumpfile is as follows:
  559.  
  560. First 4 "records" containing some info about the dumpfile itself:
  561. 1) a dumpfile header record ("FRAME dumpfile") of 18 bytes; 
  562. 2) a version number record ("v1.00") of 9 bytes; 
  563. 3) a hdrinfo record of 15 bytes, containing the integer values (2 bytes) of
  564.    DPHDRINFO *hdrinfo (DestOff= 00 00 =0, SrcOff= 06 00 =6, TypOff= 0c 00 =12, 
  565.    DatOff= 0e 00 =14, AddrLen= 06 00 =6, TypLen= 02 00=2);
  566. 4) a timestamp record of 21 bytes, formatted "mm/dd/yy hh:mm:ss",
  567. and then the packet frame records.
  568. All records start with a 1-byte tag:              
  569. 0xfe = REC_HEADER    for record "dumpfile header"
  570. 0xfd = REC_VERSION   for record "version"
  571. 0xfc = REC_HDRINFO   for record "hdrinfo"
  572. 0xfb = REC_TIMESTAMP for record "timestamp"
  573. 0xf8 = REC_FRAME     for record "packet-frame",
  574. followed by two bytes indicating the total record length (in bytes):
  575. 12 00 = 18 for record "dumpfile header"
  576. 09 00 =  9 for record "version"
  577. 0f 00 = 15 for record "hdrinfo"
  578. 15 00 = 21 for record "timestamp",
  579. i.e. including the tag and the two length-bytes.
  580. The packet frame records first start (after the tag-byte and 2 length-bytes) 
  581. with 18 bytes for the DPBUF-structure: 2 bytes for int Dev, 4 bytes for 
  582. unsigned long ClockMs, 2 bytes for unsigned Status, 2 bytes for unsigned Size, 
  583. 4 bytes for BYTE *pBuf en 4 bytes for struct _DPBUF *pNext. Next is the 
  584. Ethernet packet itself. The Ethernet packet starts with a 6-bytes destination 
  585. address, followed by a 6-bytes source address, a 2-bytes protocol type and 
  586. then the data.
  587.  
  588. Next is an example of a packet dumpfile with 1 packet frame record.
  589.  
  590. 0000:  fe 12 00 46 52 41 4d 45 20 64 75 6d 70 66 69 6c    "...FRAME dumpfil"
  591.        ^ dumpfile header record
  592. 0010:  65 00 fd 09 00 76 31 2e 30 30 00 fc 0f 00 00 00    "e....v1.00......"
  593.            ^ ^ version record         ^ ^ hdrinfo
  594. 0020:  06 00 0c 00 0e 00 06 00 02 00 fb 15 00 30 31 2f    ".............01/"
  595.        record                      ^ ^ timestamp
  596. 0030:  30 35 2f 39 31 20 31 35 3a 33 31 3a 33 38 00 f8    "05/91 15:31:38.."
  597.        record                                     ^ ^
  598. 0040:  68 00 00 00 27 34 1f 00 00 00 53 00 98 1b b2 40    "h...'4....S....@"
  599.             | Dev |  ClockMs  |Stat.|Size |    pBuf   |
  600. 0050:  00 00 00 00 00 00 c0 62 73 12 00 00 c0 44 34 1c    ".......bs....D4."
  601.       |   pNext   |  dest. address  |   src. address  |
  602. 0060:  08 00 45 00 00 45 6d b8 00 00 1e 11 08 4d 82 a1    "..E..Em......M.."
  603.       |p.typ|  data
  604. 0070:  90 ab 82 a1 90 b5 04 0c 00 a1 00 31 98 9f 30 27    "...........1..0'"
  605.                    data
  606. 0080:  02 01 00 04 09 6b 65 72 73 74 73 68 6f 77 a0 17    ".....kerstshow.."
  607.                       data
  608. 0090:  02 02 07 fb 02 01 00 02 01 00 30 0b 30 09 06 05    "..........0.0..."
  609.                      data
  610. 00a0:  2a 03 04 05 03 05 00                               "*.....
  611.             data          ^|
  612.  
  613.  
  614.  
  615. 2.6 The format of the filter file
  616.  
  617.  
  618. The filter should have the following layout:
  619.  
  620. First two characters indicating the filter type:
  621.     "+P" for a positive packet filter
  622.     "-P" for a negative packet filter
  623.     "+B" for a positive start ("begin") filter
  624.     "-B" for a negative start ("begin") filter
  625.     "+E" for a positive stop ("end") filter
  626.     "-E" for a negative stop ("end") filter
  627.  
  628. and then the filter's criteria. The following filter criteria are optional and
  629. can be given in any order, but all filter criteria of the same filter should 
  630. be on the same line, following the filter type.
  631.  
  632. Destination address:
  633.     A tag "D", followed by the Ethernet address formatted "xx:xx:xx:xx:xx:xx", 
  634.     where x is a hexadecimal digit.
  635.  
  636. Source address:
  637.     A tag "S", followed by the Ethernet address formatted "xx:xx:xx:xx:xx:xx",
  638.     where x is a hexadecimal digit.
  639.  
  640. Protocol type:
  641.     A tag "P", followed by the protocol number formatted "xxxx", where x is a 
  642.     hexadecimal digit.
  643.  
  644. Contents: 
  645.     A tag "C", followed by the contents formatted "xxxx...xx", where x is a 
  646.     hexadecimal digit.
  647.  
  648. contents Offset:
  649.     A tag "O", followed by the contents offset (integer) from the beginning
  650.     of the packet.
  651.  
  652. device Number:
  653.     A tag "N", followed by the device number (integer).
  654.  
  655. packet length Lower limit:
  656.     A tag "L", followed by the packet size lower limit (integer).
  657.  
  658. packet length Upper limit:
  659.     A tag "U", followed by the packet size upper limit (integer).
  660.  
  661.  
  662. Next is an example of a filter file with 1 positive packet filter with the
  663. destination address set to Ethernet address 08:00:20:09:b3:92, the source 
  664. address to Ethernet address 00:00:c0:44:34:1c, the protocol type to 0800 (IP), 
  665. the contents to 2bdced at offset 17, the device number to 0, and the packet 
  666. size between 60 and 1500; and 1 negative start filter with the protocol type 
  667. set to 8035 (RARP).
  668.  
  669. +P D08:00:20:09:b3:92 S00:00:c0:44:34:1c P0800 C2bdced O17 N0 L60 U1500
  670. -B P8035
  671.  
  672.  
  673. -------------------------------------------------------------------------------
  674.                                 3. THE DP.INI FILE
  675.  
  676.  
  677.  
  678.  
  679. 3.1 Introduction
  680.  
  681.  
  682. The DP.INI file is a file containing several definitions for BEHOLDER 
  683. applications, also for the Packet Capturer and the Dumpfile Viewer. For the
  684. Packet Capturer only the HDRTYPE and the HDRADDR definitions are of interest
  685. and will be discussed in the next paragraphs.
  686.  
  687.  
  688.  
  689. 3.2 The HDRTYPE definitions
  690.  
  691.  
  692. The HDRTYPE definitions contain the (key, description)-pairs for the 
  693. protocol names and their corresponding protocol numbers. The HDRTYPE 
  694. definition should start with the line:
  695.  
  696. DEFINE HDRTYPE 2 7 HEX
  697.  
  698. The "2" says the key (the protocol number) is 2 bytes long, the "7" that the 
  699. description (the protocol name) may be up to 7 characters long, and the "HEX"
  700. that the key should be taken hexadecimal. After this the (key, description)-
  701. pairs for the protocols follow in the form:
  702.  
  703. HDRTYPE 0xhh 0xhh        ccccccc    # Comment
  704.  
  705. where h is an hexadecimal digit, and c a character.
  706.  
  707.  
  708. Following is an example for the definition of the ARP-protocol with protocol
  709. number 806.
  710.  
  711. DEFINE HDRTYPE 2 7 HEX
  712. HDRTYPE 0x80 0x06       ARP      # Adress resolution
  713.  
  714.  
  715.  
  716. 3.3 The HDRADDR definitions
  717.  
  718.  
  719. The HDRTYPE definitions contain the (key, description)-pairs for the 
  720. hostnames and their corresponding Ethernet addresses. The HDRADDR definition 
  721. should start with the line:
  722.  
  723. DEFINE HDRADRR 6 13 HEX
  724.  
  725. The "6" says the key (the Ethernet address) is 6 bytes long, the "13" that the 
  726. description (the host name) may be up to 13 characters long, and the "HEX" 
  727. that the key should be taken hexadecimal. After this the (key, description)-
  728. pairs for the hostnames follow in the form:
  729.  
  730. HDRADRR 0xhh 0xhh 0xhh 0xhh 0xhh 0xhh    ccccccccccccc    # Comment
  731.  
  732. where h is an hexadecimal digit, and c a character.
  733.  
  734.  
  735. Following is an example for the definition of the host dutepp0 with Ethernet
  736. address 08:00:20:09:b3:92.
  737.  
  738. DEFINE HDRADRR 6 13 HEX
  739. HDRADRR 0x80 0x00 0x20 0x09 0xb3 0x92      dutepp0      # My host name
  740.  
  741. -------------------------------------------------------------------------------
  742.                                 4. THE RDUNIX-UTILITY
  743.  
  744.  
  745.  
  746.  
  747. 4.1 Introduction
  748.  
  749.  
  750. With Gobbler distribution comes the source for the rdunix program, which 
  751. should be compiled with gcc. The rdunix program is a simple packet dumpfile 
  752. viewer to work under UNIX. The program is called with
  753.  
  754. %rdunix [dumpfile name]
  755.  
  756. If you leave out the dumpfile name, the file "netcapt.dmp" is read. BEWARE:
  757. This program only works if the dumpfile is EXACTLY the same as under DOS, so
  758. transfer the packet dumpfile from DOS to UNIX in BINARY mode!!!!!!! Check the
  759. file length under both DOS and UNIX to be sure. The program reads the packet
  760. frame length info from the dumpfile itself (see "The format of the packet 
  761. dumpfile"), and if the packet frame becomes smaller because the LF-bytes are
  762. left out....
  763.  
  764.  
  765.  
  766. 4.2 The rdunix output format
  767.  
  768.  
  769. Following is an example of the rdunix output format.
  770.  
  771. FRAME #1
  772. Frame length = 185
  773. Logic device # = 0
  774. Timestamp (in us): 566:672:591
  775. Status 0
  776. Packet length (in bytes) = 164
  777. Destination address: 08:00:20:09:6b:39
  778. Source address: aa:00:04:00:6b:74
  779. Protocol type: 0800
  780. Data:
  781. 45 00 00 96 28 67 00 00 1e 11 4d 56 82 a1 90 99 E...(g....MV....
  782. 82 a1 90 be 00 35 09 fa 00 82 66 6f 00 01 85 80 .....5....fo....
  783. 00 01 00 00 00 00 00 01 03 73 75 6e 03 73 6f 65 .........sun.soe
  784. 08 63 6c 61 72 63 73 6f 6e 03 65 64 75 02 65 74 .clarcson.edu.et
  785. 07 74 75 64 65 6c 66 74 02 6e 6c 00 00 01 00 01 .tudelft.nl.....
  786. 02 65 74 07 74 75 64 65 6c 66 74 02 6e 6c 00 00 .et.tudelft.nl..
  787. 06 00 01 00 01 42 b4 00 2d 05 64 6f 6e 61 75 c0 .....B..-.donau.
  788. 34 0e 6e 73 2d 6d 61 69 6e 74 61 69 6e 65 72 73 4.ns-maintainers
  789. c0 4d 00 00 00 37 00 00 2a 30 00 00 0e 10 00 09 .M...7..*0......
  790. 3a 80 00 01 51 80                               :...Q.
  791.  
  792.  
  793.  
  794. FRAME #2
  795. Frame length = 172
  796. Logic device # = 0
  797. Timestamp (in us): 566:679:191
  798. Status 0
  799. Packet length (in bytes) = 151
  800. Destination address: 08:00:20:09:6b:39
  801. Source address: aa:00:04:00:6b:74
  802. Protocol type: 0800
  803. Data:
  804. 45 00 00 89 28 68 00 00 1e 11 4d 62 82 a1 90 99 E...(h....Mb....
  805. 82 a1 90 be 00 35 09 fb 00 75 1b 09 00 02 85 80 .....5...u......
  806. 00 01 00 00 00 00 00 01 03 73 75 6e 03 73 6f 65 .........sun.soe
  807. 08 63 6c 61 72 63 73 6f 6e 03 65 64 75 07 74 75 .clarcson.edu.tu
  808. 64 65 6c 66 74 02 6e 6c 00 00 01 00 01 07 74 75 delft.nl......tu
  809. 64 65 6c 66 74 02 6e 6c 00 00 06 00 01 00 01 2d delft.nl.......-
  810. 91 00 26 06 64 75 74 72 75 6e c0 31 06 64 6e 73 ..&.dutrun.1.dns
  811. 6d 67 72 c0 47 00 04 94 14 00 00 70 80 00 00 38 mgr.G......p...8
  812. 40 00 09 3a 80 00 01 51 80                      @..:...Q.
  813.  
  814. -------------------------------------------------------------------------------
  815.                                 5. HISTORY
  816.  
  817. Gobbler history:
  818.  
  819. Version 1.0 (10/04/91) by Tirza van Rijn:  
  820.     Made available for anonymous ftp on Friday, October 4th, 1991.
  821.  
  822. Version 1.1 (10/08/91) by Tirza van Rijn:  
  823.     Fixed "printf statements in DPUINI.C" bug, which caused problems on 
  824.     certain screen types. Made available for anonymous ftp on Wednesday, 
  825.     October 9th, 1991.
  826.  
  827. Version 2.0 (10/22/91) by Tirza van Rijn:  
  828.     Added display for total received packets and missed packets in Capture 
  829.     Status window of the Packet Capturer. Added packet number to Frame window 
  830.     of the Dumpfile Viewer. Fixed "on Reset dumpfile name not cleared" bug in 
  831.     the Capture Status window of the Packet Capturer. Added file interface 
  832.     (reading filter configuration from file and writing current filter 
  833.     configuration to file) to the filters. Made available for anonymous ftp on 
  834.     Friday, October 25th, 1991.
  835.